<!DOCTYPE html>
<html>
<head>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>

<!--
<div id='header'>

	<a href='Home.html'>
	<img style='display:inline-block;vertical-align:middle;' src='img/monkey32.png' /><b> Monkey V60 Documentation </b>
	</a>
	
	&nbsp;&nbsp;|&nbsp;&nbsp; <a class='small' href='Module list.html'>Modules</a>
	
	&nbsp;&nbsp;|&nbsp;&nbsp; <a class='small' href='Class index.html'>Classes</a>
	
	&nbsp;&nbsp;|&nbsp;&nbsp; <a class='small' href='Function index.html'>Functions</a>
	
	&nbsp;&nbsp;|&nbsp;&nbsp; <a class='small' href='Language reference.html'>Language</a>
	
	&nbsp;&nbsp;|&nbsp;&nbsp; <a class='small' href='Index.html'>Index</a>

</div>
-->

<div id='page'>
	<div id='main'>
		
		
		
		<div id='navpath'>
		
		
		<a href='abu.html'>abu</a>  /  <a href='abu.abuimage.html'>abuimage</a>  /  AbuImage</div>

		<div id='content'>
			<div class='box'>
<h1>Class AbuImage</h1>Adds a little functionality to mojo's Image class.

<a href='#long_desc'>More...</a>
			</div>
			
			
			
			<div class='box'>
				<h2>Properties</h2>
				<table class='small'><tr><td><a href='#Width'>Width</a> : Int</td></tr><tr><td><a href='#Height'>Height</a> : Int</td></tr><tr><td><a href='#HandleX'>HandleX</a> : Int</td></tr><tr><td><a href='#HandleY'>HandleY</a> : Int</td></tr>				</table>
			</div>
			
			
			
			<div class='box'>
				<h2>Constructors</h2>
				<table class='small'><tr><td><a href='#New'>New</a> ( path:String, textureAtlas:AbuTextureAtlas = Null )</td></tr>				</table>
			</div>
			
			
			
			<div class='box'>
				<h2>Methods</h2>
				<table class='small'><tr><td><a href='#SetHandle'>SetHandle</a> : Void ( x:Int, y:Int )</td></tr><tr><td><a href='#Draw'>Draw</a> : Void ( x:Int, y:Int, rotation:Float = 0, scaleX:Float = 1, scaleY:Float = 1 )</td></tr><tr><td><a href='#DrawFlipped'>DrawFlipped</a> : Void ( x:Int, y:Int, flip:Int = FLIP_X, rotation:Float = 0, scaleX:Float = 1, scaleY:Float = 1 )</td></tr>				</table>
			</div>
			
			
			
			<a name='long_desc'></a>
			<div class='box'>
				<h2>Detailed Discussion</h2>Adds a little functionality to mojo's Image class. Note that it doesn't inherit anything from Image.
<p>An AbuImage can be constructed anywhere, but the actual image data won't be loaded until the <a href = "abu.abuimage.html#LoadImages">LoadImages()</a> function is called or a <a href="#Draw">Draw()</a> is attempted.
<p><b>See also</b> <a href='abu.abuimage.AbuAnimationSheet.html'>AbuAnimationSheet</a>

</div>
			
			
			
			<div class='box'>
				<h2>Property Documentation</h2>		<a name='Width'></a>
				<div class='box'>
<h3 class='rounded'>Property Width : Int</h3>
[read-only] The width of the image, in pixels. Returns 0 if the image has not been loaded.


<p><b>See also</b> <a href='#Height'>Height</a>				</div>
			
			
			
			<a name='Height'></a>
				<div class='box'>
<h3 class='rounded'>Property Height : Int</h3>
[read-only] The height of the image, in pixels. Returns 0 if the image has not been loaded.


<p><b>See also</b> <a href='#Width'>Width</a>				</div>
			
			
			
			<a name='HandleX'></a>
				<div class='box'>
<h3 class='rounded'>Property HandleX : Int</h3>
[read-only] The x coordinate of the image's handle.


<p><b>See also</b> <a href='#HandleY'>HandleY</a>, <a href='#SetHandle'>SetHandle</a>				</div>
			
			
			
			<a name='HandleY'></a>
				<div class='box'>
<h3 class='rounded'>Property HandleY : Int</h3>
[read-only] The y coordinate of the image's handle.


<p><b>See also</b> <a href='#HandleX'>HandleX</a>, <a href='#SetHandle'>SetHandle</a>				</div>
			
			
			
			</div>
		<div class='box'>
				<h2>Constructor Documentation</h2>		<a name='New'></a>
				<div class='box'>
<h3 class='rounded'>Constructor New ( path:String, textureAtlas:AbuTextureAtlas = Null )</h3>
Creates a new image to be loaded from the given path.
<p>
The path can be in one of the following forms:
<p>
<li>"directory/my_image.png" - loads from an image file.<br></li>
<li>"directory/my_atlas.png#sub_texture" - loads from a texture atlas. The extension is optional.<br></li>
<p>
The optional <i>textureAtlas</i> parameter is unrelated to loading from an atlas, and has no publically implemented functionality as of yet.

				</div>
			
			
			
			</div>
		<div class='box'>
				<h2>Method Documentation</h2>		<a name='SetHandle'></a>
				<div class='box'>
<h3 class='rounded'>Method SetHandle : Void ( x:Int, y:Int )</h3>
Sets the handle for this image.
By default, images have a handle of 0,0.


<p><b>See also</b> <a href='#HandleX'>HandleX</a>, <a href='#HandleY'>HandleY</a>				</div>
			
			
			
			<a name='Draw'></a>
				<div class='box'>
<h3 class='rounded'>Method Draw : Void ( x:Int, y:Int, rotation:Float = 0, scaleX:Float = 1, scaleY:Float = 1 )</h3>
Draws the image at coordinates x, y, offset by the image's handle.


<p><b>See also</b> <a href='#DrawFlipped'>DrawFlipped</a>				</div>
			
			
			
			<a name='DrawFlipped'></a>
				<div class='box'>
<h3 class='rounded'>Method DrawFlipped : Void ( x:Int, y:Int, flip:Int = FLIP_X, rotation:Float = 0, scaleX:Float = 1, scaleY:Float = 1 )</h3>
<p>
Draws the image at coordinates x, y, offset by the image's handle.
<p>
The image is also flipped according to the flip flag, which can be any combination of:
<li>FLIP_X<br></li>
<li>FLIP_Y<br></li>
<p>
To combine flags use the '|' operator.
<p>
Flipping occurs before rotation.


<p><b>See also</b> <a href='#Draw'>Draw</a>				</div>
			
			
			
			</div>
		


			<br><br><br><br><br><br><br><br><br><br>
			<br><br><br><br><br><br><br><br><br><br>
			<br><br><br><br><br><br><br><br><br><br>
			<br><br><br><br><br><br><br><br><br><br>			
		</div>
	</div>
	
	<div id='footer'>

	</div>
</div> 

</body>
</html>